package com.szh.zx.gaoDingJavaBook.chapter7.six;

public class Outer {
	public static void main(String[] args) throws InstantiationException, IllegalAccessException {
		new Outer().test();

	}
	private void test() throws IllegalAccessException, InstantiationException {
//		创建非静态内部类的对象
		System.out.println(new Inner());
//		使用反射方式创建Inner对象
		System.out.println(Inner.class.newInstance());

	}
	public class Inner{
		public Inner() {
		}
		public Inner(String name){
			System.out.println("inner内部类的："+name);
		}

		@Override
		public String toString() {
			return "Inner对象";
		}
	}
}
